package zuoye713;

public class ForHomeWork01_HuiWenNum {
	 
    public static boolean isPalindrome(String s) {
        int start = 0;
        int end = s.length() - 1;
        while (start < end) {
            if (s.charAt(start) != s.charAt(end)) {
                return false;
            }
            start++;
            end--;
        }
        return true;
    }
 
    public static void main(String[] args) {
    	for(int i=1;i<10000;i++){
    		
    	String str = String.format("%d", i);
    	if(isPalindrome(str)){
    		System.out.println(i);
    	}
    	}
    }
}
